package cn.neusoft.baibang.exception;

public enum GlobaExceptionEnum {
    /*成功和失败 */
    SERVICE_OK("成功","1"),
    SERVICE_ERROR("失败","-1"),
    FALLBACK("熔断了","-2"),
    /*公共异常 1xxx 1000-1999*/
    COMMON_PARAM_IS_NULL("参数不能为空","1000"),
    /*Procute服务异常*/
    NO_SUCH_DATA_PRODUCT("没有找到你要找的对象","2001"),
    THE_PRODUCT_HAS_BEEN_TAKEN_OFF_THE_SHELVES("该产品已经下架","2002"),
    PRODUCT_DOES_NOT_EXIST("该产品不存在","2003");

    private String message;
    private String code;

    GlobaExceptionEnum(String message, String code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }
}
